package me.hellp.helloworld.design.observerjdk;

import java.util.Observable;

/**
 * 使用Java自带的观察者模式，实现被观察者服务
 * 
 * @author linxm
 *
 */
public class WebChatJdk extends Observable {  
	private String message;
	
    public void setMessage(String msg){
    	this.message = msg;
        this.setChanged();  
        this.notifyObservers();  
    }  
    
    public String getMessage(){
    	return message;
    }
}  